#!/bin/bash
# modify configuration.toml to support csv

chmod u+w /etc/sudoers
sed -i 's#:/usr/bin$#&:/usr/local/bin#' /etc/sudoers
chmod u-w /etc/sudoers
cp /opt/kata/share/defaults/kata-containers/configuration-qemu.toml /etc/kata-containers/configuration.toml
sed -i -e "s/#* *\(confidential_guest\).*=.*$/\1 = true/g" /etc/kata-containers/configuration.toml
sed -i "s/vmlinux.container/vmlinuz.container/g" /etc/kata-containers/configuration.toml
sed -i 's!#*firmware *=.*!firmware = "/opt/hygon/csv/OVMF.fd"!g' /etc/kata-containers/configuration.toml
sed -i 's!#*shared_fs *=.*!shared_fs = "virtio-9p"!g' /etc/kata-containers/configuration.toml
